package com.cheejee.goodscenter.service;

import java.util.List;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

import org.springframework.validation.annotation.Validated;

import com.cheejee.goodscenter.module.entity.GoodsBrandProperties;
import com.cheejee.goodscenter.module.entity.GoodsCategoryProperties;
import com.github.pagehelper.Page;

/**
 * @author CARRY
 * @Date 2020年10月28日上午1:27:15
 */
@Validated
public interface GoodsCategoryPropertiesService {

	/**
	 * 按id查询商品分类属性
	 *
	 * @param id
	 * @return
	 */
	GoodsCategoryProperties queryById(@NotNull(message = "商品分类属性ID不能为空") Long id);

	/**
	 * 按条件查询商品分类属性
	 *
	 * @param goodsId 商品id
	 * @param categoryPropertiesTemplateId 属性模板id
	 * @param propertiesName 属性名称
	 * @return
	 */
	Page<GoodsCategoryProperties> queryGoodsCategoryProperties(Long goodsId, Integer categoryPropertiesTemplateId, String propertiesName, int pageNum, int pageSize);


	int addGoodsCategoryProperties(GoodsCategoryProperties properties);
	
	int addGoodsCategoryProperties(List<GoodsCategoryProperties> properties);

	/**
	 * 修改属性值
	 *
	 * @param properties
	 * @return
	 */
	int changeGoodsCategoryPropertiesValue(@NotNull(message = "商品分类属性ID不能为空")Long propertiesId, @NotNull(message = "商品分类属性值不能为空")String propertiesValue);

	int deleteGoodsCategoryProperties(@NotEmpty(message = "商品分类属性ID不能为空")Long... id);

}
